package com.bilibili.juc.happenBefore;

/**
 * @author zuife
 * @description
 * @since 2024-04-30 22:47:11
 */
public class Demo1 {
    public static void main(String[] args) {
        Thread t1 = new Thread(() -> {
            System.out.println(Thread.currentThread().getName() + "线程开始");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(Thread.currentThread().getName() + "线程结束");
        }, "t1");
        t1.start();
        t1.interrupt();

    }
}
